CreateFrame
TheCreateFrame
method creates a new frame in this draft.
ODFrame CreateFrame (in ODObjectType frameType, in ODFrame containingFrame, in ODShape frameShape, in ODCanvas biasCanvas, in ODPart part, in ODTypeToken viewType, in ODTypeToken presentation, in ODBoolean isSubframe, in ODBoolean isOverlaid);
frameType
- The type of the frame to be created. The frame type must be either a regular frame (
kODFrameObject
) or a nonpersistent frame (kODNonPersistentFrameObject
).containingFrame
- A reference to the containing frame of the frame being created.
frameShape
- A reference to the frame shape to be created.
biasCanvas
- A reference to the canvas to whose coordinate space the new frame is biased, or
kODNULL
to use the standard platform coordinate bias.part
- A reference to the part to be displayed in the new frame.
viewType
- A tokenized string representing the initial view type for the new frame.
presentation
- The initial presentation for the new frame.
isSubframe
- kODTrue if the new frame is a subframe, otherwise
kODFalse
.isOverlaid
kODTrue
if the new frame should be an overlaid frame, otherwisekODFalse
.- return value
- A reference to the newly created frame object.
DISCUSSION
This method constructs and returns a frame object in this draft; the new frame has the characteristics specified by parameters. You can create a regular frame (kODFrameObject
) only if this draft's current permissions provide write access.The
viewType
parameter must be the tokenized form of one of the view-type constants (kODViewAsFrame
,kODViewAsLargeIcon
,kODViewAsSmallIcon
, orkODViewAsThumbnail
). You can call the session object'sTokenize
method to obtain a token corresponding to one of these constants.This method initializes the reference count of the returned frame. When you have finished using that frame, you should call its
Release
method.If this method executes successfully, it marks this draft as dirty.
EXCEPTIONS
kODErrCannotCreateFrame
- Cannot create the frame object.
kODErrInvalidObjectType
- The specified frame type is not
kODFrameObject
orkODNonPersistentFrameObject
.SEE ALSO
TheODObjectType
type (page 903).
TheODTypeToken
type (page 877).
TheODDraft::AcquireFrame
method (page 153).
TheODSession::Tokenize
method (page 622).
TheODFrame
class (page 294).
"Creating a New Embedded Frame" on page 119 in OpenDoc Programmer's Guide.
"Adding an Embedded Part" on page 305 in OpenDoc Programmer's Guide.
"Embedding a Single Part" on page 347 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help